﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;


namespace SypGui
{
    static class Program
    {
        /// <summary>
        /// Point d'entrée principal de l'application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            //Before launching Syp we look for old process instances and kill them.
            Process SypCurrentProcess = Process.GetCurrentProcess();
            Process[] SypOldProcesses = Process.GetProcessesByName(SypCurrentProcess.ProcessName);
            foreach (Process p in SypOldProcesses)
            {
                if (p.Id != SypCurrentProcess.Id)
                    p.Kill();
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new SypForm());
            
        }
    }
}